<!--
 * @Author: qianduanxuyaochendian lxy_01@outlook.com
 * @Date: 2022-05-07 09:49:56
 * @LastEditors: qianduanxuyaochendian lxy_01@outlook.com
 * @LastEditTime: 2022-05-24 22:42:50
 * @FilePath: \job\web\src\views\notify\Index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="container">
    <div class="top">
      <n-gradient-text type="success" :size="30">
        面试通知 / 反馈
      </n-gradient-text>
    </div>
    <div class="table-container">
      <vxe-table
        border
        align="center"
        :row-config="{ isHover: true }"
        :data="tableData"
      >
        <vxe-column type="seq" title="序号" width="60"></vxe-column>
        <vxe-column field="cname" title="投递公司"></vxe-column>
        <vxe-column field="apply_job" title="应聘职位"></vxe-column>
        <vxe-column
          field="status"
          title="简历状态"
          :formatter="formatStatus"
        ></vxe-column>
      </vxe-table>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, defineComponent, onMounted } from "vue"
// import { VxeColumnPropTypes } from "vxe-table";
//引入api
import { getResumeListAPI } from "@/http/api/student"
import XEUtils, { get } from "xe-utils"
const tableData = ref([])
const StatusList = [
  { label: "等待通知", value: 0 },
  { label: "简历一跃", value: 1 },
  { label: "面试邀请", value: 2 },
]
const formatStatus = ({ cellValue }) => {
  const item = StatusList.find((item) => item.value === cellValue)
  return item ? item.label : ""
}
//获取投递简历列表信息
const getResumeList = () => {
  getResumeListAPI()
    .then((result) => {
      tableData.value = result.result
      console.log(result.result)
    })
    .catch((err) => {
      console.log(err)
    })
}

//生命周期钩子
onMounted(() => {
  getResumeList()
})
</script>
<style lang="scss" scoped>
.container {
  .top {
    margin: 10px;
  }
  .table-container {
    margin-top: 15px;
  }
}
</style>
